package com.ormbench.base;

import javax.servlet.http.HttpServletRequest;

/**
 * Utility Class generating links
 * 
 * @author jacobc
 */
public final class LinkUtil {

	private static final String PATH_SEPERATOR = "/";
	private static final String PATH_ACTION = "action/";
	private static final String PATH_CSS = "css/";
	private static final String PATH_IMG = "img/";
	private static final String PATH_JS = "js/";

	private String action;
	private String css;
	private String img;
	private String js;

    public LinkUtil(HttpServletRequest request) {
        super();
        action = request.getContextPath() + PATH_SEPERATOR + PATH_ACTION;
    	css = request.getContextPath() + PATH_SEPERATOR + PATH_CSS;
    	img = request.getContextPath() + PATH_SEPERATOR + PATH_IMG;
    	js = request.getContextPath() + PATH_SEPERATOR + PATH_JS;
    }

    public String getAction() {
    	return action;
    }
    
    public String getCss() {
    	return css;
    }
    
    public String getImg() {
    	return img;
    }
    
    public String getJs() {
    	return js;
    }
}
